package com.xbongbong.saas.model;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.IModel;
import com.xbongbong.saas.domain.entity.SaleStageSyncStatusEntity;

import java.util.List;
import java.util.Map;

/**
 * @author haibin.zhang
 * @version v1.0
 * @date 2019/2/13 11:05
 * @since v1.0
 */
public interface SaleStageSyncStatusModel extends IModel<SaleStageSyncStatusEntity> {

    @Override
    List<SaleStageSyncStatusEntity> findEntitys(Map<String, Object> param);

    SaleStageSyncStatusEntity getByKey(Long key, String corpid);

    SaleStageSyncStatusEntity getByStageProcessId(String corpid, Long formId, Long stageProcessId);

    Integer save(SaleStageSyncStatusEntity saleStageSyncStatus) throws XbbException;

    void insertBatch(List<SaleStageSyncStatusEntity> list);

    Integer deleteBatch(List<SaleStageSyncStatusEntity> saleStageSyncStatusList, String corpid);

    boolean isSyncStatusInProgress(String corpid, Long formId, Long stageProcessId);
}
